<?php

/**
 * Contains "ViewServer" mvc view class
 *
 * LICENSE: MIT
 *
 * @author Peter Pippinger
 * @category PP
 * @package PP_Mvc
 * @copyright Copyright (c) 2013 Peter Pippinger
 * @license http://opensource.org/licenses/MIT
 * @version 1.1.0
 * @since Class exists since release 1.0.0
 */

/**
 * "ViewServer" mvc view class
 *
 * Provides view handling for mvc template
 *
 * @author Peter Pippinger
 * @category PP
 * @package PP_Mvc
 * @copyright Copyright (c) 2013 Peter Pippinger
 * @license http://opensource.org/licenses/MIT
 * @version 1.1.0
 * @since Class exists since release 1.0.0
 */
class ViewServer extends View
{
	/**
	 * Model object.
	 * 
	 * @var object
	 */
	protected $model;

	/**
	 * Controller object.
	 * 
	 * @var object
	 */
	protected $controller;

	/**
	 * Initializes the view.
	 * 
	 * @param ControllerServer $controller        	
	 * @param ModelServer $model        	
	 */
	public function __construct(ControllerServer $controller, ModelServer $model)
	{
		$this->controller = $controller;
		$this->model = $model;
	}

	/**
	 * Returns the output of the view.
	 * 
	 * @return string
	 */
	public function output()
	{
		return parent::evalToString("?>" . file_get_contents(dirname(__FILE__) . "/phtml/Server.phtml"));
	}
}
